package com.qp.basics.common.repository;

import org.hibernate.dialect.MySQL8Dialect;
import org.hibernate.dialect.function.SQLFunctionTemplate;
import org.hibernate.type.StringType;

import java.sql.Types;

public class MySQL8Dialect2 extends MySQL8Dialect {
    public MySQL8Dialect2(){
        super();
        registerHibernateType(Types.NULL, "string");
        registerHibernateType(Types.BIGINT, "long");
        registerFunction("convert", new SQLFunctionTemplate(new StringType(),"convert(?1 using ?2)") );
    }
}
